.class public Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;
.super Landroid/support/v4/app/FragmentStatePagerAdapter;
.source "CardAppPagerAdapter.java"


# instance fields
.field private appModelList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/model/AppModel;",
            ">;"
        }
    .end annotation
.end field

.field private mFragments:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Landroid/support/v4/app/Fragment;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/support/v4/app/FragmentManager;Ljava/util/List;)V
    .registers 7
    .param p1, "fm"    # Landroid/support/v4/app/FragmentManager;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/support/v4/app/FragmentManager;",
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/model/AppModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 18
    .local p2, "appModels":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/AppModel;>;"
    invoke-direct {p0, p1}, Landroid/support/v4/app/FragmentStatePagerAdapter;-><init>(Landroid/support/v4/app/FragmentManager;)V

    .line 14
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    iput-object v1, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->mFragments:Ljava/util/List;

    .line 19
    invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_e
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_24

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/model/AppModel;

    .line 20
    .local v0, "appModel":Lcom/brixd/niceapp/model/AppModel;
    iget-object v2, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->mFragments:Ljava/util/List;

    invoke-static {v0}, Lcom/brixd/niceapp/activity/fragment/CardFragment;->getInstance(Lcom/brixd/niceapp/model/AppModel;)Lcom/brixd/niceapp/activity/fragment/CardFragment;

    move-result-object v3

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_e

    .line 22
    .end local v0    # "appModel":Lcom/brixd/niceapp/model/AppModel;
    :cond_24
    iput-object p2, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->appModelList:Ljava/util/List;

    .line 23
    return-void
.end method


# virtual methods
.method public addAppModels(Ljava/util/List;)V
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/model/AppModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 48
    .local p1, "appModels":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/AppModel;>;"
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    .line 49
    .local v1, "frags":Ljava/util/List;, "Ljava/util/List<Landroid/support/v4/app/Fragment;>;"
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_9
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_1d

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/model/AppModel;

    .line 50
    .local v0, "appModel":Lcom/brixd/niceapp/model/AppModel;
    invoke-static {v0}, Lcom/brixd/niceapp/activity/fragment/CardFragment;->getInstance(Lcom/brixd/niceapp/model/AppModel;)Lcom/brixd/niceapp/activity/fragment/CardFragment;

    move-result-object v3

    invoke-interface {v1, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_9

    .line 53
    .end local v0    # "appModel":Lcom/brixd/niceapp/model/AppModel;
    :cond_1d
    iget-object v2, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->mFragments:Ljava/util/List;

    if-nez v2, :cond_28

    .line 54
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    iput-object v2, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->mFragments:Ljava/util/List;

    .line 56
    :cond_28
    iget-object v2, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->mFragments:Ljava/util/List;

    invoke-interface {v2, v1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 57
    iget-object v2, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->appModelList:Ljava/util/List;

    invoke-interface {v2, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 58
    return-void
.end method

.method public getAppModels()Ljava/util/List;
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/model/AppModel;",
            ">;"
        }
    .end annotation

    .prologue
    .line 34
    iget-object v0, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->appModelList:Ljava/util/List;

    return-object v0
.end method

.method public getCount()I
    .registers 2

    .prologue
    .line 62
    iget-object v0, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->mFragments:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getFragments()Ljava/util/List;
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Landroid/support/v4/app/Fragment;",
            ">;"
        }
    .end annotation

    .prologue
    .line 26
    iget-object v0, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->mFragments:Ljava/util/List;

    return-object v0
.end method

.method public getItem(I)Landroid/support/v4/app/Fragment;
    .registers 3
    .param p1, "position"    # I

    .prologue
    .line 67
    iget-object v0, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->mFragments:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/support/v4/app/Fragment;

    return-object v0
.end method

.method public setAppModels(Ljava/util/List;)V
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/model/AppModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 38
    .local p1, "appModels":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/AppModel;>;"
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    .line 39
    .local v1, "frags":Ljava/util/List;, "Ljava/util/List<Landroid/support/v4/app/Fragment;>;"
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_9
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_1d

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/model/AppModel;

    .line 40
    .local v0, "appModel":Lcom/brixd/niceapp/model/AppModel;
    invoke-static {v0}, Lcom/brixd/niceapp/activity/fragment/CardFragment;->getInstance(Lcom/brixd/niceapp/model/AppModel;)Lcom/brixd/niceapp/activity/fragment/CardFragment;

    move-result-object v3

    invoke-interface {v1, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_9

    .line 43
    .end local v0    # "appModel":Lcom/brixd/niceapp/model/AppModel;
    :cond_1d
    iput-object v1, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->mFragments:Ljava/util/List;

    .line 44
    iput-object p1, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->appModelList:Ljava/util/List;

    .line 45
    return-void
.end method

.method public setFragments(Ljava/util/List;)V
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Landroid/support/v4/app/Fragment;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 30
    .local p1, "fragments":Ljava/util/List;, "Ljava/util/List<Landroid/support/v4/app/Fragment;>;"
    iput-object p1, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CardAppPagerAdapter;->mFragments:Ljava/util/List;

    .line 31
    return-void
.end method
